﻿Imports System.Data.SqlClient
Public Class GetEmployeeName
    Public Shared Function GetEmployee() As SortedList
        Str = "SELECT EMPLOYEE_ID, EMPLOYEE_NAME =ENGLISH_NAME+' ( '+KHMER_NAME+' )' FROM EMPLOYEE WHERE ACTIVE=1"
        Dim cmd As New SqlCommand(Str, Dbinterface.Connection)
        Dim reader As SqlDataReader = cmd.ExecuteReader
        Dim list As New SortedList
        While reader.Read
            Dim emp As New EmployeeInfo
            With emp
                .EmployeeId = reader("EMPLOYEE_ID").ToString
                .EnglishName = reader("EMPLOYEE_NAME").ToString

                list.Add(emp.EmployeeId, emp)

            End With
        End While
        reader.Close()
        reader = Nothing
        cmd = Nothing
        Return list

    End Function
End Class
